<script setup>
import Main from "./Main.vue";
import { darkTheme, zhCN, dateZhCN } from 'naive-ui'
import { ref, provide } from 'vue'

provide('changeTheme', () => {
  themeModeClick()
})
const theme = ref(null)
const themeModeClick = () => {
  theme.value = theme.value ? null : darkTheme
}
const themeOverrides = ref({
  common: {
    primaryColor: '#2080f0',
    primaryColorHover: '#4098fc',
    primaryColorPressed: '#1060c9',
    primaryColorDisabled: '#2080f0',
    infoColor: '#36ad6a'
  },
})
</script>

<template>
  <div>
    <n-config-provider :theme="theme" :theme-overrides="themeOverrides" :locale="zhCN" :date-locale="dateZhCN">
      <div style="height: 100vh;">
        <RouterView />
      </div>
    </n-config-provider>
  </div>
</template>

<style scoped lang="less"></style>
